package reflect;

import java.lang.reflect.Constructor;

public class Test {
    public static void main(String[] args) throws Exception {
       Class cls=Class.forName("reflect.Student");
       Constructor c1= cls.getConstructor();
       Object obj=c1.newInstance();
       System.out.println(obj);

        Constructor c=cls.getConstructor(String.class,int.class,String.class);
        Object obj1=c.newInstance("小糖人",666,"女");
        System.out.println(obj1);


    }
}
